package com.mallsystem.common.service;

import com.mallsystem.common.bean.Cart;
import com.mallsystem.common.exception.AllException;

import java.util.List;

public interface CartService {
    //添加
    boolean insertOrUpdate(Cart cart);
    //根据id删除
    boolean delete(Integer id,Integer userId) throws AllException;
    //修改
    boolean update(Cart cart,Integer userId) throws AllException;
    //搜索
    List<Cart> search(Cart condition);

    Cart selectById(Integer id);
    //批量删除
    boolean deleteBatch(List<Integer> ids,Integer userId) throws AllException;

    List<Cart> selectByIds(Integer[] cartIds, Integer userId) throws AllException;
}
